2022-12-16

knitr::opts_chunk$set(echo=TRUE)

R Markdown Presentation with Plotly

library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(ggplot2)
library(car)
## Loading required package: carData
data("mtcars")
suppressPackageStartupMessages({library(plotly)})
plot_ly(mtcars, x = ~hp, y =~mpg,type='scatter',mode='markers')